{include file=header.html} 
<script type="text/javascript" src="{lib file=mobile/cart.js}" charset="utf-8"></script>
<script type="text/javascript">
$(function(){
	var id = $('input:radio:checked').attr('id');
	$('#selected-store strong').html($('#cart'+id+'_amount').html());
	$('input:radio').change(function(){
		var id2 = $(this).attr('id');
		$('#selected-store strong').html($('#cart'+id2+'_amount').html());
	})
	$('.cart-it .myscb').click(function(){
		$('.cart-it .myscb .masker').removeClass('active');
		$(this).find('.masker').addClass('active');
	})
})
function go2order()
{
	var store_id = $('input:radio:checked').val();
	window.location.href='{$real_site_url}/index.php?app=order&goods=cart&store_id='+store_id;
}
</script>
<div id="main">
  <div id="page-cart" class="page-cart page-body">
  <!--{foreach from=$carts item=cart key=store_id name=fe_carts}-->
  <div class="cart-it mt10 cart-it-{$store_id}">
    <div class="store-info clearfix ">
      <div class="myscb relative">
      	<label for="{$store_id}" class="masker absolute {if $smarty.foreach.fe_carts.first}active{/if}"></label>
        <input class="rebuild-checkbox"  name="store_id" type="radio"  id="{$store_id}" {if $smarty.foreach.fe_carts.first}checked="checked"{/if} value="{$store_id}"/>
      </div>
      <div class="info">
          <h3><span><label for="{$store_id}">{$cart.store_name|escape}</label></span><span class="ml20 hidden">{$lang.goods_amount}:&nbsp;&nbsp;<strong  id="cart{$store_id}_amount">{$cart.amount|price}</strong></span></h3>      
      </div>
    </div>
    <ul>
      <!--{foreach from=$cart.goods item=goods name=fe_goods}-->
      <li id="cart_item_{$goods.rec_id}">
        <div class="it clearfix webkit-box"> <a  href="{url app=goods&id=$goods.goods_id}" class="pic"><img src="{$goods.goods_image}" alt="{$goods.goods_name|escape}" /></a>
          <div class="detail"> <a href="{url app=goods&id=$goods.goods_id}" class="desc">
            <h4>{$goods.goods_name|escape}</h4>
            </a>
            <p class="props">{$goods.specification|escape}</p>
            <div class="price"> <span>￥</span> <em>{$goods.price}</em> x <span class="txt">
              <input type="text" value="{$goods.quantity}"   orig="{$goods.quantity}" changed="{$goods.quantity}" onkeyup="change_quantity({$store_id}, {$goods.rec_id}, {$goods.spec_id}, this);"/>
              </span> </div>
            <a class="del" href="javascript:;" onclick="drop_cart_item({$store_id}, {$goods.rec_id});">{$lang.drop}</a> 
          </div>
        </div>
      </li>
      <!--{/foreach}-->
    </ul>
  </div>
  <!--{/foreach}-->
  <div class="go2order clearfix"><span class="float-left ml10" id="selected-store">{$lang.goods_amount}{$lang.colon}<strong>{$cart.amount|price}</strong></span> <a  href="javascript:;"  onclick="go2order();"  class="btn float-right">去结算</a> </div>
  </div>
</div>